<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test tree</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../tests_organization.html" title="Declaring and organizing tests">
<link rel="prev" href="test_cases/param_test.html" title="Parametrized test cases">
<link rel="next" href="test_tree/test_suite.html" title="Test suite">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="test_cases/param_test.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tests_organization.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="test_tree/test_suite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_test.tests_organization.test_tree"></a><a class="link" href="test_tree.html" title="Test tree">Test tree</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="test_tree/test_suite.html">Test
        suite</a></span></dt>
<dt><span class="section"><a href="test_tree/master_test_suite.html">Master
        test suite</a></span></dt>
<dt><span class="section"><a href="test_tree/test_naming.html">Tests
        naming</a></span></dt>
<dt><span class="section"><a href="test_tree/test_tree_content.html">Test
        tree content</a></span></dt>
</dl></div>
<p>
        The test tree is the hierarchy of test cases and test suites, along with
        all the fixtures (global, case or suite level), and the respective dependencies
        within all those elements.
      </p>
<p>
        A test tree is composed with:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
            Test cases: those are the elements in the tree that contain the body
            of the tests, and they constitute the <span class="bold"><strong>leaves</strong></span>
            of the tree.
          </li>
<li class="listitem">
            Test suites: those are the are internal nodes of the tree. These elements
            that do not have any body or executable code themselves, but fixtures
            that execute code and tests can be attached to them.
          </li>
<li class="listitem">
            The master test suite: this is the root of the tree, and is by definition
            a test suite. Fixtures attached to the master test suite are <span class="bold"><strong>global</strong></span> fixtures.
          </li>
<li class="listitem">
            fixtures: those are units of code that are executed before and/or after
            the test units above.
          </li>
</ul></div>
<p>
        The following hierarchy represents a test tree (further detailed in the
        <a class="link" href="test_tree/test_suite.html" title="Test suite">test-suite</a>
        section) <span class="bold"><strong>without</strong></span> any fixture:
      </p>
<p>
        <span class="inlinemediaobject"><img src="../../images/class-hier.jpg"></span>
      </p>
<p>
        <a class="link" href="decorators.html" title="Decorators">Decoration</a>
        can be added to test suites and cases except for the master test suite. Those
        decoration may modify the way the <span class="emphasis"><em>Unit Test Framework</em></span>
        handles the tree. For instance, there is no defined order in the execution
        of test cases enforced by the tree itself, except for the fixtures and the
        elements they relate to (suite, case); decoration may be used to instruct
        a specific order among the elements of the tree.
      </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
          The test-tree by itself does not give any particular order in the execution
          of the test-cases. The only implicit order is given by the fixtures. To
          indicate a particular order, specific decorators should be used.
        </p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="test_cases/param_test.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tests_organization.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="test_tree/test_suite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
